package com.ai.wxy.spring.service.api.dto;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 默认返回实体
 *
 * @author 石头
 * @Date 2019/11/20
 * @Version 1.0
 **/
@Data
@NoArgsConstructor
public class DefaultServiceResult<T> implements ServiceResult{
    private T data;

    public DefaultServiceResult(T data){
        this.data = data;
    }

    public static <F>DefaultServiceResult<F> build(F data){
        return new DefaultServiceResult(data);
    }
}
